<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>JSP for ModifyatomForm form</title>
		<link rel="stylesheet" type="text/css" href="images/main.css">
		<title></title>
	<script type="text/javascript">
		function cancelsub(){
			document.modifyatomForm.operation.value="list";
			document.modifyatomForm.submit();
		}
	</script>
	</head>
	<body>

		<%
		String way = request.getParameter("way");
		%>
		<html:form action="/modifyatom.do">
			<%
			if (way.equals("1")) {
			%>
			<table border="0" align="center">
				<tr>
					<td>
						<div id=groupdiv>
							原子组名 :
						</div>
					</td>
					<td>

						<html:select property="prename">
							<html:option value="">请选择菜单类</html:option>
							<html:option value="8">用户基本属性</html:option>
							<html:option value="9">用户价值属性</html:option>
							<html:option value="10">用户行为属性</html:option>
							<html:option value="11">用户竞争属性</html:option>
							<html:option value="12">用户套餐属性</html:option>
						</html:select>
						<script type="text/javascript">
						document.modifyatomForm.prename.value=<bean:write name="groupinfo" property="BOOKMARK_ID"/>
						</script>
						<html:errors property="prename" />
					</td>
				</tr>
				<tr>
					<td>
						<div id=namediv>
							原子名称 :
						</div>
					</td>
					<td>

						<input type=text name="name"
							value=<bean:write name="groupinfo" property="ATOM_GROUP_NAME"/>>
						<html:errors property="name" />
					</td>
				</tr>
				<tr>
					<td>
						<div id=BIZ_DESCdiv>
							原子描述 :
						</div>
					</td>
					<td>
						<input type=text name="BIZ_DESC"
							value=<bean:write name="groupinfo" property="ATOM_GROUP_DESC"/>>
						<html:errors property="BIZ_DESC" />
						<input type=hidden name="checkid"
							value="<bean:write name="groupinfo" property="ATOM_GROUP_ID"/>">
					</td>
				</tr>
			</table>
			<%
				}
				if (way.equals("2")) {
			%>
			<table border="0" align="center">
				<tr>
					<td>
						<html:select property="relname">
							<html:option value="">选存在关联原子组</html:option>
							<logic:iterate name="relGroupList" id="it">
								<option value=<bean:write name="it" property="ATOM_GROUP_ID"/>>
									<bean:write name="it" property="ATOM_GROUP_NAME" />
								</option>
							</logic:iterate>
						</html:select>
					</td>
				</tr>
				<tr>
					<td>
						<html:select property="prename">
							<html:option value="">请选择变更原子组</html:option>
							<html:option value="delete">删除以上存在的关系</html:option>
							<logic:iterate name="allGroupList" id="i">
								<option value=<bean:write name="i" property="ATOM_GROUP_ID"/>>
									<bean:write name="i" property="ATOM_GROUP_NAME" />
								</option>
							</logic:iterate>
						</html:select>
					</td>
				</tr>
				<tr>
					<td>
						<div id=namediv>
							原子名称 :
						</div>
					</td>
					<td>

						<input type=text name="name"
							value=<bean:write name="atominfo" property="BIZ_ATOM_NAME"/>>
						<html:errors property="name" />
					</td>
				</tr>
				<tr>
					<td>
						<div id=BIZ_DESCdiv>
							原子描述 :
						</div>
					</td>
					<td>
						<input type=text name="BIZ_DESC"
							value=<bean:write name="atominfo" property="BIZ_ATOM_DESC"/>>
						<html:errors property="BIZ_DESC" />
					</td>
				</tr>
				<tr>
					<td>
						值类型:
					</td>
					<td>
						<html:select property="VALUE_TYPE_ID">
							<option value="1">
								数字型
							</option>
							<option value="2">
								字符型
							</option>
						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.VALUE_TYPE_ID.value="<bean:write name="atominfo" property="VALUE_TYPE_ID"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						展示方式：
					</td>
					<td>
						<html:select property="SHOW_TYPE_ID">
							<logic:iterate id="showtype" name="atomShowType">
								<option
									value="<bean:write name="showtype" property="SHOW_TYPE_ID"/>">
									<bean:write name="showtype" property="SHOW_TYPE_NAME" />
								</option>
							</logic:iterate>

						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.SHOW_TYPE_ID.value="<bean:write name="atominfo" property="SHOW_TYPE_ID"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						代码来源表：
					</td>
					<td>
						<input type="text" name="CDE_SRC_TABLE_NAME"
							value=<bean:write name="atominfo" property="CDE_SRC_TABLE_NAME"/>>
					</td>
				</tr>
				<tr>
					<td>
						基础数据来源表：
					</td>
					<td>
						<input type="text" name="BAS_TABLE_NAME"
							value=<bean:write name="atominfo" property="BAS_TABLE_NAME"/>>
					</td>
				</tr>
				<tr>
					<td>
						基础表字段名：
					</td>
					<td>
						<input type="text" name="BAS_TABLE_COL_NAME"
							value=<bean:write name="atominfo" property="BAS_TABLE_COL_NAME"/>>
					</td>
				</tr>
				<tr>
					<td>
						基础表字段类型：
					</td>
					<td>
						<input type="text" name="BAS_TABLE_COL_TYPE"
							value=<bean:write name="atominfo" property="BAS_TABLE_COL_TYPE"/>>
					</td>
				</tr>
				<tr>
					<td>
						业务原子类别标识：
					</td>
					<td>
						<html:select property="ATOM_KIND_ID">

							<option value="1">
								只适用于客户
							</option>
							<option value="2">
								只适用于用户
							</option>
							<option value="3">
								适用于两者
							</option>
						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.ATOM_KIND_ID.value="<bean:write name="atominfo" property="ATOM_KIND_ID"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						原子单位标志：
					</td>
					<td>
						<html:select property="BIZ_ATOM_FLAG">
							<option value="time">
								时间
							</option>
							<option value="money">
								钱数
							</option>
							<option value="other">
								其他
							</option>
						</html:select>
						<script language="javascript">   
    						document.modifyatomForm.BIZ_ATOM_FLAG.value="<bean:write name="atominfo" property="BIZ_ATOM_FLAG"/>";   
  						</script>
					</td>
				</tr>
				<tr>
					<td>
						源表中文字段名：
					</td>
					<td>
						<input type="text" name="SRC_TABLE_COL_NAME"
							value=<bean:write name="atominfo" property="SRC_TABLE_COL_NAME"/>>
					</td>
				</tr>

			</table>
			<input type=hidden name="checkid"
				value="<bean:write name="atominfo" property="BIZ_ATOM_ID"/>">
			<%
			}
			%>
			<center>
				<input type="submit" value="提交">
				<input type="button" value="取消" onclick="cancelsub()">
			</center>
			<html:hidden property="operation" value="mod" />
			<input name="way" type="hidden" value="<%=way%>">
		</html:form>
	</body>
</html>

